package April._25;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Properties;

public class Main {
    public static void main(String[] args) throws IOException {
        // 创建Properties对象
        Properties properties = new Properties();

        // load
        properties.load(
                new InputStreamReader(
                        new FileInputStream("fileTest\\config.properties"),"UTF-8"));

        // 获取属性
        String user = properties.getProperty("username");
        System.out.println(user);
    }
}
